<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>理学院教务选课系统</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
<!--common css-->
    <link rel="stylesheet" type="text/css" href="/public/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="/public/stylesheets/theme.css">
    <link rel="stylesheet" href="/public/stylesheets/jquery.fileupload-ui.css">
    <link rel="stylesheet" type="text/css" href="/public/stylesheets/common.css">
    <link rel="stylesheet" href="/public/lib/font-awesome/css/font-awesome.css">

<!--admin css-->
<?php if ($_SESSION['mid']==1) {?>
<?php }?>

<!--teacher css-->
<?php if ($_SESSION['mid']==2) {?>
<?php }?>

<!--student css-->
<?php if ($_SESSION['mid']==3) {?>
<?php }?>

<!--common js-->
    <!--script src="/public/lib/jquery-1.7.2.min.js" type="text/javascript"></script-->
    <script src="/public/js/common.js" type="text/javascript"></script>
    <script type="text/javascript" src="/public/js/jquery-1.9.1.min.js"></script>   
    <script type="text/javascript" src="/public/js/bootstrap-paginator.js"></script>

    <!-- Demo page code -->

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

    <!-- Le fav and touch icons -->
    <link rel="shortcut icon" href="../assets/ico/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
  </head>

  <!--[if lt IE 7 ]> <body class="ie ie6"> <![endif]-->
  <!--[if IE 7 ]> <body class="ie ie7 "> <![endif]-->
  <!--[if IE 8 ]> <body class="ie ie8 "> <![endif]-->
  <!--[if IE 9 ]> <body class="ie ie9 "> <![endif]-->
  <!--[if (gt IE 9)|!(IE)]><!--> 
  <body class=""> 
  <!--<![endif]-->
    
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    <li><a class="visible-desktop">欢迎<?php echo $_SESSION['roleName'] ?></a></li>
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i> <?php echo $_SESSION['userName'];?>
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                            <!-- <li class="divider"></li>
                            <li><a tabindex="-1" class="visible-phone" href="#">Settings</a></li>
                            <li class="divider visible-phone"></li> -->
                            <li><a tabindex="-1" href="<?php echo SITE_ROOT;?>reset-password">重置密码</a></li>
                            <li><a tabindex="-1" href="<?php echo SITE_ROOT?>logout">退出</a></li>
                        </ul>
                    </li>
                    
                </ul>
                <a class="brand" href="index.html"><span class="first">理学院</span> <span class="second">教务选课系统</span></a>
        </div>
    </div>

    <div class="sidebar-nav">
        <?php if($_SESSION['mid']==1) {?>
        <!--管理员菜单-->
        <a href="#student-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>学生管理</a>
        <ul id="student-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>admin/show-students">学生信息</a></li>
        </ul>
        <a href="#teacher-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>教师管理</a>
        <ul id="teacher-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>admin/show-teachers">教师信息</a></li>            
        </ul>
        
        <a href="#class-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>班级管理</a>
        <ul id="class-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>admin/show-classes">所有班级</a></li>
        </ul>

        <a href="#course-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>课程管理<span class="label label-info">+2</span></a>
        <ul id="course-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>admin/show-courses/">所有课程</a></li>
            <li><a href="<?php echo SITE_ROOT; ?>admin/show-active-courses/">已开课程</a></li>
        </ul>
        <a href="#grade-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>成绩管理</a>
        <ul id="grade-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>admin/show-active-courses/">所有科目</a></li>            
        </ul>
        <!--管理员菜单END-->
        <?php }elseif ($_SESSION['mid']==2) {?>
        <!--教师菜单-->
        <a href="#personalInfo-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>个人信息管理<span class="label label-info">+2</span></a>
        <ul id="personalInfo-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>teacher/show-personal-info/">我的基本信息</a></li>
            <li ><a href="<?php echo SITE_ROOT; ?>teacher/update-personal-info/">修改我的基本信息</a></li>
        </ul>

        <a href="#course-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>课程管理</a>
        <ul id="course-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>teacher/show-all-courses/">教授课程</a></li>
        </ul>
        <!--教师菜单END-->
        <?php }elseif ($_SESSION['mid']==3) {?>
        <!--学生菜单-->
        <a href="#personalInfo-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>个人信息管理<span class="label label-info">+2</span></a>
        <ul id="personalInfo-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>student/show-personal-info/">我的基本信息</a></li>
            <li ><a href="<?php echo SITE_ROOT; ?>student/update-personal-info/">修改我的基本信息</a></li>
        </ul>

        <a href="#course-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>选课管理<span class="label label-info">+2</span></a>
        <ul id="course-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT; ?>student/show-all-courses/">可选课程</a></li>
            <li ><a href="<?php echo SITE_ROOT; ?>student/show-selected-course/">我的选课</a></li>
        </ul>
        <!--学生菜单END-->
        <? }else{?>
        <?php }?>
        
        <a href="<?php echo SITE_ROOT;?>" class="nav-header" ><i class="icon-question-sign"></i>帮助中心</a>

        <a href="#accounts-menu" class="nav-header" data-toggle="collapse"><i class="icon-briefcase"></i>系统操作<?php if($_SESSION['mid']==1){?><span class="label label-info">+3</span><?php }else{?>
            <span class="label label-info">+2</span><?php }?></a>
        <ul id="accounts-menu" class="nav nav-list collapse">
            <li><a href="<?php echo SITE_ROOT;?>reset-password">修改我的密码</a></li>
            <?php if($_SESSION['mid']==1){?>
            <li><a href="<?php echo SITE_ROOT;?>admin/reset-user-password/">修改用户密码</a></li><?php }?>
            <li><a href="<?php echo SITE_ROOT?>logout">退出系统</a></li>
        </ul>
    </div>
    <div class="content">